<?php
namespace App\Service;

class Alg
{
    public static function Word(){
        $random=rand(10,15);
        $captcha = '';
        for($i = 0;$i < $random; $i++){
            switch(mt_rand(1,3)){
                case 1: //数字：49-57分别代表1-9
                    $captcha .= chr(mt_rand(49,57));
                    break;
                case 2: //小写字母:a-z
                    $captcha .= chr(mt_rand(65,90));
                    break;
                case 3: //大写字母:A-Z
                    $captcha .= chr(mt_rand(97,122));
                    break;
            }
        }
        return $captcha;
    }
}
